<%@ page contentType="text/html; charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
	<title>left</title>
	<%@ include file="/common/meta.jsp"%>
	<s:head theme="ajax"/>
	<script type="text/javascript">
		$(document).ready(function(){
			$("#submit").click(function(){
				var account = $("#account").val().trim();
				var passwd = $("#passwd").val().trim();
				var repasswd = $("#repasswd").val().trim();
				var name = $("#name").val().trim();
				if( account == ""){
					alert("登录帐号不能为空~！");
					$("#account").focus();
					return false;
				}else if( passwd == ""){
					alert("登录密码不能为空~！");
					$("#passwd").focus();
					return false;
				}else if(repasswd == ""){
					alert("确认密码不能为空~！");
					$("#repasswd").focus();
					return false;
				}else if(passwd != repasswd){
					alert("两次密码不相匹配~！");
					$("#repasswd").focus();
					return false;
				}else if(name == ""){
					alert("用户名不能为空~！");
					$("#name").focus();
					return false;
				}
			});
		});
	</script>
</head>

<body>

 	<s:form action="registAction" method="post" namespace="/user">
 		<table>
 			<tr>
 				<td>登录帐号：</td>
 				<td><s:textfield name="user.account"></s:textfield></td>
 			</tr>
 			<tr>
 				<td>登录密码：</td>
 				<td><s:password name="user.passwd"></s:password></td>
 			</tr>
 			<tr>
 				<td>确认密码：</td>
 				<td><s:password id="user.repasswd"></s:password></td>
 			</tr>
 			<tr>
 				<td>绑定邮箱：</td>
 				<td><s:textfield name="user.email"></s:textfield></td>
 			</tr>
<%--
 			<tr>
 				<td>性别：</td>
 				<td><s:radio name="registForm.userGender" list="#{0:'男',1:'女' }"
						listKey="key" listValue="value" value="0"></s:radio>
				</td>
 			</tr>
 			<tr>
 				<td>出生日期：</td>
 				<td><s:datetimepicker name="registForm.userBirthday" toggleType="explode"
 					 	value="today" type="date" language="zh_CN"
						displayFormat="yyyy-MM-dd"></s:datetimepicker>
				</td>
 			</tr>

 			<tr>
 				<td>所属部门：</td>
 				<td><s:textfield name="user.userInfo.userDept"></s:textfield></td>
 			</tr>
 			<tr>
 			<td>所处职位：</td>
 				<td><s:textfield name="user.userInfo.userDuty"></s:textfield></td>
 			</tr>
 			<tr>
 				<td>电子邮件：</td>
 				<td><s:textarea name="user.userInfo.userEmail"></s:textarea></td>
 			</tr>
 			<tr>
 			<td>现住地址：</td>
 				<td><s:textarea name="user.userInfo.userAddress"></s:textarea></td>
 			</tr>
 			<tr>
 				<td>备注信息：</td>
 				<td><s:textarea name="user.userInfo.userRemark"></s:textarea></td>
 			</tr>

 			<tr>
 				<td>上传照片：</td>
 				<td><s:file name="regForm.photoFile"></s:file></td>
 			</tr>
--%>
 			<tr>
 				<td colspan="2" align="center"><s:submit value="提交"></s:submit></td>
 			</tr>
 		</table>
	</s:form>	

</body>
</html>